<template>
  <div class="error-page">
    <img src="../../assets/images/error_images/404.png" alt="404" />
    <div class="tip">
      <h1>这里什么也没有！</h1>
      <el-button class="el-button" type="primary" size="default" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

let $router = useRouter();
let goHome = () => {
  $router.push('/home');
};
</script>

<style lang="scss" scoped>
.error-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  img {
    width: 600px;
    height: 300px;
  }
  .tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(50px, -50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    h1 {
      font-size: 40px;
      font-weight: bold;
      color: var(--el-color-primary);
    }
    .el-button {
      border-radius: 20px;
      width: 100px;
    }
  }
}
</style>
